import styles from './index.less';

import React from 'react';
import Link from 'umi/link';
import { Spin,Icon } from 'antd';

const WaterFall = (props) => {
  return (
    <div>
    	<div className={styles.row}>
	    	{	props.data.map(val=>
	    			<div key={val.id} className={styles.item}>
		    			<Link className={styles.row_item_body} to={`/detail/id=${val.id}`}>
		    				<div className={styles.imglBox}>
			    				{val.smallpic ?(
		    						<img  src={val.smallpic}></img>
		    					)	
		    					:(
		    						 <img  src="../../assets/images/bad-pic.png"></img>
		    					)}
				            </div>
				            <div className={styles.labelBox}>
				              	<p className={styles.tit}>{val.username}</p>
				              	<div className={styles.photos}><span>{val.pic.length}</span><i></i></div>
				            </div>
				            {val.sys_status != 2 ?(
			            		<div  className={styles.examine_no}>
		            				{val.sys_status == 1 ?(
		            					<div  className={styles.examine_no_body}>
							                <span className={styles.examine_loading}>
							                  <div className={styles.loader}>
						                          <Spin/>
						                      </div>
							                </span>
							                <p>正在审核</p>
						              	</div>
	            					)
					              	:(
					              		<div className={styles.examine_going}>
							                <div className={styles.examine_going_title}>
							                  <Icon type="close-circle" />
							                  <span className={styles.examine_going_info}>未审核通过</span>
							                </div>
							                <div className={styles.examine_going_des}>所上传内容依照国家相关规定或活动要求</div>
							            </div>
					              	)}
		            				
					            </div>
			            	)	
				            :('')} 
		    			</Link>
		    		</div>
	    		)
	    	}
	    </div>

	    {
	    	props.loading
	    	? 	<div  className={styles.loading}>
			    	<Spin size="large" tip="正在加载..."/>	
				</div>
			:   <div  className={styles.over} >—————— 我也是有底线的 ——————</div>
	    }
    </div>
  );
};

export default WaterFall;
